<template>
  <div>
    <h2>我的总资产：{{ moneyCount }}</h2>
    <div>
      是不是有钱人:<input
        type="checkbox"
        :checked="moneyCount > 10000 ? true : false"
      />
    </div>
    <h3>目前的状态：{{ moneyCount > 10000 ? '有钱人' : '穷光蛋' }}</h3>
    消费项目：
    <button @click="moneyCount -= 60">洗脚60</button>&nbsp&nbsp
    <button @click="moneyCount -= 100">吃饭100</button>&nbsp&nbsp
    <button @click="moneyCount -= 1000">约会1000</button>&nbsp&nbsp
    <button @click="moneyCount += 100">送外卖+100</button>
  </div>
</template>

<script>
export default {
  name: 'work-component',
  data() {
    return {
      moneyCount: 10000,
    }
  },
}
</script>
